﻿using System;
using System.Net;

namespace Argos.Data.Model
{
	/// <summary>
	/// Represents a host computer that is hosting the monitoring
	/// functionality of Argos.
	/// </summary>
	[Serializable]
	public class MonitoringHost : ItemBase
	{

		#region public IPAddress Address { get; set; }

		private static string AddressPropertyName = "Address";

		/// <summary>
		/// Sets or returns the IP address of the host.
		/// </summary>
		public IPAddress Address
		{
			get { return this.GetProperty<IPAddress>(AddressPropertyName); }
			set { this.SetProperty(AddressPropertyName, value); }
		}

		#endregion

		#region public string HostName { get; set; }

		private static string HostNamePropertyName = "HostName";

		/// <summary>
		/// Sets or returns the host name (Net BIOS name) of the host computer.
		/// </summary>
		public string HostName
		{
			get { return this.GetProperty<string>(HostNamePropertyName); }
			set { this.SetProperty(HostNamePropertyName, value); }
		}

		#endregion

		#region public DateTime LastHeartBeat { get; set; }

		private static string LastHeartBeatPropertyName = "LastHeartBeat";

		/// <summary>
		/// Sets or returns the date and time the host computer last contacted
		/// the data store holding the information about the targets to monitor.
		/// </summary>
		public DateTime LastHeartBeat
		{
			get { return this.GetProperty<DateTime>(LastHeartBeatPropertyName); }
			set { this.SetProperty(LastHeartBeatPropertyName, value); }
		}

		#endregion

	}
}
